package org.yray.sip.rtp.server;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.nio.NioDatagramChannel;

public class UrtpChannelInitializer extends ChannelInitializer<NioDatagramChannel> {
    private UrtpServerHandler urtpServerHandler;
    public UrtpChannelInitializer(UrtpServerHandler urtpServerHandler)
    {
        this.urtpServerHandler=urtpServerHandler;
    }
    @Override
    protected void initChannel(NioDatagramChannel ch) throws Exception {
        ChannelPipeline pipeline = ch.pipeline();
        pipeline.addLast(urtpServerHandler);
    }


}
